//判断大鱼和果实的距离
function momFruitsCollision()
{
	if (!data.gameOver) 
	{
		for (var i = 0; i < fruit.num; i++) 
			{
				if(fruit.alive[i])
				{
					var l = calLength2(fruit.x[i], fruit.y[i],mom.x,mom.y);
					if( l < 900)
					{
						fruit.dead(i);
						data.fruitNum++;
						mom.momBobyCount++;
						if (mom.momBobyCount > 7) 
							 	mom.momBobyCount = 7;
						if (fruit.fruitType[i] == "blue") 
						{
							data.double = 2;
						}
						wave.born(fruit.x[i], fruit.y[i]);
				}
			}
		}
	}
}
	
//大鱼和小鱼的距离判断
function momBabyCollision()
{
	if (data.fruitNum > 0 && !data.gameOver) 
	{
		var l = calLength2(mom.x,mom.y,baby.x,baby.y);
		if( l < 900)
		{
			baby.babyBobyConut = 0;
			mom.momBobyCount = 0;
			//大鱼和小鱼接触
			data.addScore();

			halo.born(baby.x,baby.y);
		}
	}
}